Configuring the CygNetTimeZones.xml File

Properly define and install a CygNetTimeZones.xml file to provide drop-down time zone options for your CygNet Software installation.

By default, a Universal Interface Service (UIS) is assumed to be in the same time zone as its associated field device. If the field device is not in the same time zone as the associated UIS, you must specify the time zone of the field device in the Display Name drop-down menu of the Time Zone page in the remote device editor.

The CygNetTimeZones.xml file is located in the CygNet\Services\ARS folder on your host server. This file enables the conversion of field device local time to Coordinated Universal Time (UTC) for point processing in the host system.

Example

<Timezones>

<TZ DisplayName="(GMT+04:30) Kabul" Mins="-270" CygNetKey="1" Active="0">

<Standard Name="Afghanistan Standard Time" Mins="0" Year="0" Month="0" DayOfWeek="0" Day="0" Hour="0" Minute="0" Second="0" Milliseconds="0"/>

<Daylight Name="Afghanistan Daylight Time" Mins="-60" Year="0" Month="0" DayOfWeek="0" Day="0" Hour="0" Minute="0" Second="0" Milliseconds="0"/>

</TZ>

<TZ>

ETC

</TZ>

</Timezones>

A sample CygNet time zone file (CygNetTimeZones.xml) is available in the Samples\Misc folder of the CygNet source. Use the following procedure to configure a CygNetTimeZones.xml file to meet your specific needs.

To Configure a CygNetTimeZones.xml File

  1. Define an XML file using the components listed in the tables below.
  2. Name the file CygNetTimeZones.xml and save it.
  3. Open CygNet Host Manager or CygNet Explorer and stop all services on the host.
  4. Install the valid CygNetTimeZones.xml file in your master CygNet\Services\ARS folder.
  5. Return to CygNet Host Manager or CygNet Explorer and restart all services.
  6. Open your DDS and (re)configure remote devices using the CygNetTimeZones.xml file.

See Time Zone Page for more information.

Elements Defined

The following table provides the names of all relevant CygNetTimeZones.xml elements and useful information about each.

Element Notes

Timezones

  • Root element.
  • No attributes available.
  • Child element is TZ.

TZ

  • Child of Timezones.
  • Attributes are: DisplayName, Mins, CygNetKey, and Active.
  • Children are Standard Name and Daylight Name.

Standard Name

  • Indicates a time zone's Standard Time name.
  • Child of TZ.
  • Attributes are Mins, Year, Month, DayOfWeek, Day, Hour, Minute, Second, and Milliseconds.

Daylight Name

  • Indicates a time zone's Daylight Time name.
  • Child of TZ.
  • Attributes are Mins, Year, Month, DayOfWeek, Day, Hour, Minute, Second, and Milliseconds.

Attributes Defined

The following table provides the names of all relevant CygNetTimeZones.xml attributes and useful information about each.

Attributes Notes
TZ

DisplayName

The name of the time zone as you want it to appear in the Display Name drop-down menu of the Time Zone page in your remote device editor.

Mins

Used in the TZ element, Mins is the number of minutes a certain time zone is offset from UTC.

To get UTC, add the Mins value to that time zone's local time. For instance, if it is 8:00 a.m. local time in Anchorage, add 540 minutes to get UTC. If it is 8:00 AM local time in Riyadh, add -180 minutes to get UTC.

CygNetKey

A unique numerical identifier for each TZ entry in a CygNetTimeZones.xml file. It is stored in the database records and used to identify a selected time zone.

Active

Indicates whether this time zone is active or not in the DDS. 1 indicates active. 0 indicates inactive.

Standard Name and Daylight Name

Mins

  • Used in the Standard Name element, Mins indicates a deviation from the Mins attribute value used in the TZ element. Typically, this is 0.
  • Used in the Daylight Name element, Mins indicates a deviation from the Mins attribute value used in the TZ element. Typically, this is -60.

Year

  • Used in the Standard Name element, indicates the year Standard Time for the respective time zone begins. Typically, this is 0.
  • Used in the Daylight Name element, indicates the year Daylight Time for the respective time zone begins. Typically, this is 0.

Month

  • Used in the Standard Name element, indicates the month Standard Time for the respective time zone begins.
  • Used in the Daylight Name element, indicates the month Daylight Time for the respective time zone begins.

DayOfWeek

  • Used in the Standard Name element, indicates the day of the week Standard Time for the respective time zone begins. This is the number of days after Sunday, so Sunday is 0, Monday is 1, etc.
  • Used in the Daylight Name element, indicates the day of the week Daylight Time for the respective time zone begins. This is the number of days after Sunday, so Sunday is 0, Monday is 1, etc.

Day

  • Used in the Standard Name element, indicates the day of the week in the month Standard Time for the respective time zone begins. The Day attribute works with the DayOfWeek attribute. 1 means the first day of week in the month, 2 means the second day of week in the month, up to 5 meaning the last day of week in month. For example, Month="11" DayOfWeek="0" Day="1" is the first Sunday of November.
  • Used in the Daylight Name element, indicates the day of the week in the month Daylight Time for the respective time zone begins. The Day attribute works with the DayOfWeek attribute. 1 means the first day of week in the month, 2 means the second day of week in the month, up to 5 meaning the last day of week in month. For example, Month="3" DayOfWeek="0" Day="1" is the first Sunday of March.

Hour

  • Used in the Standard Name element, indicates the hour Standard Time for the respective time zone begins.
  • Used in the Daylight Name element, indicates the hour Daylight Time for the respective time zone begins.

Minute

  • Used in the Standard Name element, indicates the minute Standard Time for the respective time zone begins.
  • Used in the Daylight Name element, indicates the minute Daylight Time for the respective time zone begins.

Second

  • Used in the Standard Name element, indicates the second Standard Time for the respective time zone begins.
  • Used in the Daylight Name element, indicates the second Daylight Time for the respective time zone begins.

Milliseconds

  • Used in the Standard Name element, indicates the millisecond Standard Time for the respective time zone begins.
  • Used in the Daylight Name element, indicates the millisecond Daylight Time for the respective time zone begins.

Back to top